<%@ taglib prefix="s" uri="/struts-tags" %>
 
<html>
<head>
<title>List Government Office Region</title>
	<script type="text/javascript">
	     /* function showDetails(idGOV){
			document.getElementById('govID').setAttribute('value', idGOV);
			document.getElementById('show').submit();
		} */
		function showDetail(id)	{
			$("#DetailsID").val(id);
			$("#showdetail").submit();		
		}
		function searchAlpha(str)	{
			$("#searchAlpha").val(str);
			$("#showSearchAlpha").submit();		
		}
		//Xu ly checkbox
/*         function Init () {
            var checkbox = document.getElementById("InActiveCheckBox");
            if (checkbox.addEventListener) {
                checkbox.addEventListener ("CheckboxStateChange", OnChangeCheckbox, false);
            }
        }

        function OnChangeCheckbox (event) {
            var checkbox = event.target;
            if (checkbox.checked) {
            	$("#isActive").val('no');
                alert ("The check box is checked.");
            }
            else {
            	$("#isActive").val('yes');
            	alert ("The check box is not checked.");
            }
        }*/
	</script>
</head>
 
<body onload="Init ()">
<!--showConent-->
<h1 class = "styleTitle">List Government Office Region</h1>

<s:form action="listgov" method="post" id="showSearchAlpha">
    <!-- <a href="http://localhost:8080/GovOfficeRegion/listgov?searchAlpha=all" > All |</a> -->
    <a href="javascript:filter" onclick="searchAlpha('all')"> All |</a>
    <a href="javascript:filter" onclick="searchAlpha('s09')"> 0-9 |</a>
    <a href="javascript:filter" onclick="searchAlpha('a')"> A B C D E |</a>
    <a href="javascript:filter" onclick="searchAlpha('f')"> F G H I J |</a>
    <a href="javascript:filter" onclick="searchAlpha('k')"> K L M N |</a>
    <a href="javascript:filter" onclick="searchAlpha('o')"> O P Q R |</a>
    <a href="javascript:filter" onclick="searchAlpha('s')"> S T U V |</a>
    <a href="javascript:filter" onclick="searchAlpha('w')"> W X Y Z</a>
    <input id="searchAlpha" name="searchAlpha" style="display: none;"></input>
</s:form>
<div id = "creat_program">

<form action="#" method="post" id="myform">
    <s:checkbox name="includeInActive" id="includeInActive" onclick="myform.submit();" />
    Include In-active
</form>

</div>
<div style = "margin: 20px">
<form action="viewgov" method="post" id="showdetail">
    <table id="insured_list" class="tablesorter">
        <thead>
            <tr>
		        <th> GovOfficeRegionName</th>
		        <th> Description </th>
		        <th> County </th>
		        <th> isActive</th>
            </tr>
     </thead>       
     </table>
     <input id="DetailsID" name="govID" style="display: none;"></input>
</form>
</div>

<br/>

<div id="pager" class="pager" style = "width:100%; margin-top:20px;">
<form style="float:right;margin-right:30px">
<img src="images/first.png" class="first"/>
<img src="images/prev.png" class="prev"/>
Page
<input type="text" class="pagedisplay"/>
<img src="images/next.png" class="next"/>
<img src="images/last.png" class="last"/>
</form>
</div>

<script defer="defer">
$(document).ready(function () {
$("#insured_list")
.tablesorter({ widthFixed: true, widgets: ['zebra'] })
.tablesorterPager({ container: $("#pager") });
}
);
</script>
</body>
</html>

